<template>
  <bottom-dialog ref="dialog" :dark="dark" :on-dismiss="onDismiss">
    <div class="test" @click.stop="">
      <button @click="close">关闭</button>
    </div>
  </bottom-dialog>
</template>

<script>
import {ref} from 'vue'
import BottomDialog from "@/components/common/dialog/BottomDialog";

export default {
  name: "BottomTest",
  components: {
    'bottom-dialog': BottomDialog
  },
  props: {
    dark: Boolean,
    onDismiss: Function,
  },
  setup(props) {
    const dialog = ref()
    const {dark, onDismiss} = props;
    const close = () => {
      dialog.value.dismiss()
    }
    return {
      dark,
      onDismiss,
      dialog,
      close
    }
  }
}

</script>

<style scoped>
.test {
  background: #ccc;
  height: 200px;
}
</style>
